﻿using System;
using System.Windows.Controls;
using WindowsPhoneMVC.Navigation;
using WindowsPhoneMVC.Phone.Interfaces;

namespace WindowsPhoneMVC.ActionResults
{
    public class PartialViewResult : ViewResult
    {
        public PartialViewResult(string viewName, object model, NavigationContext context) : base(viewName, model, context)
        {}

        public UserControl View { get; private set; }

        protected override void RenderView(IMvcFrame navigationFrame, UserControl view)
        {
            View = view;
        }
    }
}